import request from '@/plugins/request';

export function MenuList (data?: Record<string, any>) {
    return request({
      url: "/api/admin/menu/tree",
      method: "get",
      params:data,
    });
}



export function GetMenuList(data?) {
  return request({
    url: "/api/system/menu/list",
    method: "post",
    data,
  });
}

export function UpdateRoleMenu(data) {
  return request({
    url: "/api/system/role/menu/update",
    method: "post",
    data,
  });
}

export function CreateHeaderMenu(data) {
  return request({
    url: "/api/system/menu/header/create",
    method: "post",
    data,
  });
}

export function CreateSiderMenu(data) {
  return request({
    url: "/api/system/menu/sider/create",
    method: "post",
    data,
  });
}

export function DeleteMenu(data) {
  return request({
    url: "/api/system/menu/delete",
    method: "post",
    data,
  });
}

export function DeleteMenuMultiple(data) {
  return request({
    url: "/api/system/menu/delete/multiple",
    method: "post",
    data,
  });
}

export function UpdateMenu(data) {
  return request({
    url: "/api/system/menu/update",
    method: "post",
    data,
  });
}
